<?php

include_once("./script/dbconnect.php");

function countCategories() {
    getConnect();
    $result = mysqli_query(getConnect(), "select * from categories") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countManufacturers() {
    $result = mysqli_query(getConnect(), "select * from manufacturers") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countProducts() {
    $result = mysqli_query(getConnect(), "select * from products") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countOrdersIn() {
    $result = mysqli_query(getConnect(), "select * from imports") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countOrdersOut() {
    $result = mysqli_query(getConnect(), "select * from orders") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countCustomers() {
    $result = mysqli_query(getConnect(), "select * from customers") or die(mysql_error());
    echo mysqli_num_rows($result);
}

function countIncome() {
    echo "1.000.000";
}